:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --text-color: #2b2d42;
    --light-text: #8d99ae;
    --border-color: #e9ecef;
    --error-color: #ef233c;
    --success-color: #2ec4b6;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --easy-color: #4cc9f0;
    --medium-color: #4895ef;
    --hard-color: #3f37c9;
}

/* 基础样式 */
* {
    padding-left: 5px;
    padding-top: 2px;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
}

/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.back-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.2);
}

/* 详情容器 */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 路线图集 */
.hike-gallery {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.gallery-main {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* 核心信息 */
.hike-header {
    margin-bottom: 24px;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hike-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.difficulty-badge.easy {
    background-color: var(--easy-color);
}

.difficulty-badge.medium {
    background-color: var(--medium-color);
}

.difficulty-badge.hard {
    background-color: var(--hard-color);
}

.hike-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--light-text);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 评分和基本信息 */
.hike-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .hike-meta {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }
}

.meta-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.hike-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    color: #ffc107;
    font-size: 1.2rem;
}

.rating-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.rating-value span {
    color: var(--primary-color);
}

.rating-count {
    font-size: 0.9rem;
    color: var(--light-text);
}

.meta-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}

.hike-location {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.meta-text {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--light-text);
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.map-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.map-preview {
    width: 100%;
    height: 120px;
    background-color: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
}

.map-info {
    flex: 1;
    padding: 16px;
}

.map-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.map-info p {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 12px;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map-link:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* 内容区域 */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.content-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background-color: #f8f9fe;
    border-bottom: 1px solid var(--border-color);
}

.section-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
}

.section-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.section-content {
    padding: 20px;
    overflow: visible; /* 确保内容不被隐藏 */
}

.section-content p {
    padding: 10px;
    color: #000000; /* 黑色文字 */
    background-color: #ffffff; /* 白色背景 */
    font-size: 1rem;
    line-height: 1.6;
    overflow: visible;
    border-radius: var(--radius-md); /* 可选：添加圆角保持设计一致性 */
    box-shadow: var(--shadow-sm); /* 可选：添加轻微阴影提升层次感 */
}

.equipment-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.equipment-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f8f9fe;
    border-radius: 6px;
}

.equipment-icon {
    color: var(--primary-color);
}

/* 评论区 */
.comments-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.comments-section .section-header {
    position: relative;
}

.comments-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--light-text);
}

.comments-list {
    padding: 0 20px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4ff;
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-bottom: var(--space-sm);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-user {
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--light-text);
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.no-comments-icon {
    font-size: 2.5rem;
    color: var(--light-text);
    margin-bottom: 16px;
}

.no-comments p {
    color: var(--light-text);
    margin-bottom: 0;
}

/* 评论表单 */
.comment-form {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fe;
}

.comment-form h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form h3 i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 16px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.textarea-with-icon {
    position: relative;
}

.textarea-with-icon i {
    position: absolute;
    left: 14px;
    top: 16px;
    color: var(--light-text);
}

.textarea-with-icon textarea {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    min-height: 120px;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-with-icon input:focus,
.textarea-with-icon textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hike-title {
        font-size: 1.75rem;
    }

    .hike-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .equipment-list {
        grid-template-columns: 1fr;
    }
}

.readonly-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #555; /* 可选：使文字颜色稍暗 */
    border-color: #ddd; /* 可选：调整边框颜色 */
}


/* 新增的模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ccc;
}

.gallery-main {
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-main:hover {
    transform: scale(1.02);
}


/* 富文本编辑器样式 */
.fr-box {
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.fr-wrapper {
    min-height: 150px;
}

/* 评论表单调整 */
.comment-form .form-group textarea {
    display: none; /* 隐藏原始textarea，由富文本编辑器替代 */
}

.comment-form .fr-box {
    border: 1px solid #ddd;
    margin-top: 10px;
}

/* 提交按钮样式 */
.btn-submit {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #45a049;
}

.btn-submit i {
    margin-right: 8px;
}